package com.example.demo01.Entity.mobileEntity;

import com.example.demo01.Entity.abstractclass.AbstractServiceCenter;
import org.springframework.stereotype.Component;

@Component
public class ServePoint extends AbstractServiceCenter {
    //attributes
    private String type;
    private Float distance;//与目标点之间的距离
    //setter
    public void setType(String type) {
        this.type = type;
    }

    public void setDistance(Float distance) {
        this.distance = distance;
    }

    //getter
    public String getType() {
        return type;
    }

    public Float getDistance() {
        return distance;
    }

    //constructors
    public ServePoint(){super();}

    public ServePoint(String name, String address, String province, String city, String domain, Float lon, Float lat, String geom, String type) {
        super(name, address, province, city, domain, lon, lat, geom);
        this.type = type;
    }

    public ServePoint(String name, String address, String province, String city, String domain, Float lon, Float lat, String geom, String type,Float distance) {
        super(name, address, province, city, domain, lon, lat, geom);
        this.type = type;
        this.distance=distance;
    }

    //toString
    @Override
    public String toString() {
        return "ServePoint{" +
                "type='" + type + '\'' +
                ", name='" + name + '\'' +
                ", address='" + address + '\'' +
                ", province='" + province + '\'' +
                ", city='" + city + '\'' +
                ", domain='" + domain + '\'' +
                ", lon=" + lon +
                ", lat=" + lat +
                ", geom='" + geom + '\'' +
                '}';
    }
}
